<template>
    <div>
          <van-nav-bar
            title="编辑收货地址"
            left-text="返回"
            left-arrow
            @click-left="onClickLeft"
            />

            <van-address-edit
            :area-list="areaList"
            show-delete
            show-search-result
            :search-result="searchResult"
            :area-columns-placeholder="['请选择', '请选择', '请选择']"
            @save="onSave"
            @delete="onDelete"
            />
    </div>
</template>

<script setup lang='ts'>
import {ref} from "vue"
import { showToast } from 'vant';
import { areaList } from '@vant/area-data'

const onClickLeft = () => history.back();
interface SearchResult{
        name:string,
        address:string
    }
const searchResult = ref<SearchResult[]>([]);

const onSave = () => showToast('保存成功');
const onDelete = () => showToast('删除成功');
   
</script>

<style scoped>

</style>